﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.RBAC
{
    public interface IUserRoleServices
    {
        /// <summary>
        /// 获取用户的角色列表
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>用户的角色列表</returns>
        Task<List<UserRole>> GetUserRoles(int userId);

        /// <summary>
        /// 为用户分配角色
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="roleIds">角色ID列表</param>
        /// <returns>受影响的行数</returns>
        Task<int> AssignUserRoles(int userId, List<int> roleIds);
    }
}
